#include <stdio.h>
int main()
{
    int a;
    printf("请输入您要判断的年份:");
    scanf("%d", &a);
    if (a%400==0 ||(a%4 ==0&&a%100!=0))
    printf("\n闰年:%d",a);
    return 0;
}

#include <stdio.h>
int main()
{
    int a=1,i=0;
    printf("  能被7整除的数:\n");
    while (a <= 100)
    {
        if(a%7==0)
        {
            printf("%4d",a);
            i++;
            if(i%5==0)
            printf("\n");
        }
        a++;
    }
    return 0;
}

#include <stdio.h>
int findMax(int arr[],int size){
    int max = arr[0];
    for (int i =1; i < size; i++){
        if (arr[i] > max){
            max = arr[i];
        }
    }
    return max;
}

int main(){
    int array[] = {3,5,2,8,1};
    int size = sizeof(array) / sizeof(array[0]);

    int maxValue = findMax(array,maxValue);
    printf("数组中的最大值是 ：%d\n",maxValue);

    return 0;
}

#include <stdio.h>
int main(){
    int x1,x2 = 1,day;
    for (day = 9;day > 0;day--){
        x1 = 2 *(x2 + 1);
        x2 = x1;
    }
    printf("第一天的桃子数 ：%d\n", x1);
    return 0;
}